﻿// <com.woyouqiu.Copyright>
// --------------------------------------------------------------
// <copyright>上海有求网络科技有限公司 2015</copyright>
// <Solution>Vecen.BangChuang</Solution>
// <Project>Vecen.BangChuang.Application</Project>
// <FileName>IPromotionAppService.cs</FileName>
// <CreateTime>2017-06-05 21:51</CreateTime>
// <Author>何苗</Author>
// <Email>hemiao@woyouqiu.com</Email>
// <log date="2017-06-05 21:51" version="00001">创建</log>
// --------------------------------------------------------------
// </com.woyouqiu.Copyright>

using System.Threading.Tasks;
using Abp.Application.Services;
using Abp.Application.Services.Dto;
using Vecen.BangChuang.BangChuang.Common.Dtos;
using Vecen.BangChuang.BangChuang.Promotions.Dtos;

namespace Vecen.BangChuang.BangChuang.Promotions {

    /// <summary>
    /// 推广业务
    /// </summary>
    public interface IPromotionAppService: IApplicationService {
        /// <summary>
        /// 后台获取推广对象列表
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PagedResultDto<PromotionListForAdminOutDto>> GetPromotionsForAdminAsync(
            PromotionConditionForAdminInputDto input);


        /// <summary>
        /// App获取推广对象列表
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PagedResultDto<PromotionListOutDto>> GetPromotionsAsync(PromotionConditionInputDto input);


        /// <summary>
        /// 保存推广对象
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task SavePromotionAsync(PromotionInputDto input);

        /// <summary>
        /// 获得待编辑推广对象
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<PromotionInputDto> GetPromotionInputDtoForEditAsync(int id);
            /// <summary>
        /// 获得推广对象详情
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<PromotionOutDto> GetPromotionAsync(int id);

        /// <summary>
        /// 下架
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task OffTheShelfAsync(int id);


        /// <summary>
        /// 上架
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task OnTheShelfAsync(int id);


        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task DeletePromotionAsync(int id);



        /// <summary>
        /// 获得分享内容
        /// </summary>
        /// <param name="promotionId"></param>
        /// <returns></returns>
        Task<ShareModel> GetShareModelByIdAsync(int promotionId);

        /// <summary>
        /// 分享成功回调
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task ForwardedSuccessCallback(ShareSuccessInputDto input);

        /// <summary>
        /// 点击成功回调(增加点击量)
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task ClickSuccessCallback(int id);
    }
}